# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.1246 -> 1.1247 # net/sunrpc/svcsock.c 1.60 -> 1.61 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 03/09/23 davidm@tiger.hpl.hp.com 1.1239.1.20 # ia64: Improve comment for reserve_memory(). # -------------------------------------------- # 03/09/23 davidm@tiger.hpl.hp.com 1.1239.1.21 # ia64: Mark access_ok() as likely to succeed (as is done in x86 tree). # -------------------------------------------- # 03/09/23 davidm@tiger.hpl.hp.com 1.1247 # Make NFS server work on ia64 (and other 64-bit arches) again. # Patch received via Matthew Wilcox. # -------------------------------------------- # diff -Nru a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c --- a/net/sunrpc/svcsock.c Wed Sep 24 00:40:11 2003 +++ b/net/sunrpc/svcsock.c Wed Sep 24 00:40:11 2003 @@ -352,9 +352,9 @@ struct svc_sock *svsk = rqstp->rq_sock; struct socket *sock = svsk->sk_sock; int slen; - struct { struct cmsghdr cmh; - struct in_pktinfo pki; - } cm; + char buffer[CMSG_SPACE(sizeof(struct in_pktinfo))]; + struct cmsghdr *cmh = (struct cmsghdr *)buffer; + struct in_pktinfo *pki = (struct in_pktinfo *)CMSG_DATA(cmh); int len = 0; int result; int size; @@ -374,13 +374,13 @@ msg.msg_iovlen = 0; msg.msg_flags = MSG_MORE; - msg.msg_control = &cm; - msg.msg_controllen = sizeof(cm); - cm.cmh.cmsg_len = sizeof(cm); - cm.cmh.cmsg_level = SOL_IP; - cm.cmh.cmsg_type = IP_PKTINFO; - cm.pki.ipi_ifindex = 0; - cm.pki.ipi_spec_dst.s_addr = rqstp->rq_daddr; + msg.msg_control = cmh; + msg.msg_controllen = sizeof(buffer); + cmh->cmsg_len = CMSG_LEN(sizeof(*pki)); + cmh->cmsg_level = SOL_IP; + cmh->cmsg_type = IP_PKTINFO; + pki->ipi_ifindex = 0; + pki->ipi_spec_dst.s_addr = rqstp->rq_daddr; if (sock_sendmsg(sock, &msg, 0) < 0) goto out;